/* RedFire Web App Styles */

/* 全局布局 */
.app-layout {
  min-height: 100vh;
}

.app-content {
  margin: 24px;
  padding: 24px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
}

/* 页面头部 */
.page-header {
  margin-bottom: 24px;
}

.page-title {
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 8px 0;
  color: #262626;
}

.page-description {
  font-size: 14px;
  color: #8c8c8c;
  margin: 0;
}

/* 应用头部 */
.app-header {
  padding: 0 24px;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.header-right {
  display: flex;
  align-items: center;
}

.app-title {
  font-size: 18px;
  font-weight: 600;
  color: #1890ff;
}

.trigger {
  font-size: 18px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.3s;
}

.trigger:hover {
  background-color: #f5f5f5;
}

.notification-btn {
  font-size: 16px;
  padding: 8px;
  border-radius: 6px;
  transition: all 0.3s;
}

.notification-btn:hover {
  background-color: #f5f5f5;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s;
}

.user-info:hover {
  background-color: #f5f5f5;
}

.username {
  font-size: 14px;
  font-weight: 500;
}

/* 侧边栏 */
.app-sider {
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.15);
}

.logo {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  margin: 16px;
  border-radius: 8px;
  gap: 8px;
}

.logo-icon {
  font-size: 24px;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.3));
}

.logo-text {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 1px;
}

.sidebar-menu {
  border-right: none;
}

.sidebar-menu .ant-menu-item {
  margin: 4px 8px;
  border-radius: 6px;
  overflow: hidden;
}

.sidebar-menu .ant-menu-item-selected {
  background-color: #1890ff !important;
}

/* 应用底部 */
.app-footer {
  text-align: center;
  padding: 12px 24px;
  background: #f9f9f9;
  border-top: 1px solid #f0f0f0;
}

/* 仪表盘卡片 */
.dashboard-card {
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  transition: all 0.3s;
}

.dashboard-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.dashboard-card .ant-card-head {
  border-bottom: 1px solid #f0f0f0;
  padding: 16px 24px;
}

.dashboard-card .ant-card-body {
  padding: 24px;
}

/* 统计信息 */
.statistic {
  text-align: center;
}

.statistic-title {
  font-size: 14px;
  color: #8c8c8c;
  margin-bottom: 8px;
}

.statistic-value {
  font-size: 24px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

/* 工具类 */
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.flex { display: flex; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }

.font-medium { font-weight: 500; }
.font-bold { font-weight: 600; }

.text-sm { font-size: 12px; }
.text-base { font-size: 14px; }
.text-lg { font-size: 16px; }

.text-gray-500 { color: #8c8c8c; }
.text-gray-600 { color: #595959; }

.space-y-3 > * + * { margin-top: 12px; }

/* 响应式设计 */
@media (max-width: 768px) {
  .app-content {
    margin: 16px;
    padding: 16px;
  }
  
  .app-header {
    padding: 0 16px;
  }
  
  .header-left .app-title {
    display: none;
  }
  
  .user-info .username {
    display: none;
  }
  
  .dashboard-card .ant-card-body {
    padding: 16px;
  }
  
  .page-title {
    font-size: 20px;
  }
}

@media (max-width: 576px) {
  .app-content {
    margin: 8px;
    padding: 12px;
  }
  
  .statistic-value {
    font-size: 20px;
  }
  
  .page-title {
    font-size: 18px;
  }
}

/* 自定义滚动条 */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* 动画效果 */
.fade-in {
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide-in {
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* 加载状态 */
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

/* 自定义按钮样式 */
.btn-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.btn-group .ant-btn {
  flex: 1;
  min-width: 100px;
}

/* 表格自定义样式 */
.custom-table .ant-table-thead > tr > th {
  background: #fafafa;
  border-bottom: 2px solid #f0f0f0;
  font-weight: 600;
}

.custom-table .ant-table-tbody > tr:hover > td {
  background: #f5f5f5;
}

/* 卡片网格布局 */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 768px) {
  .card-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}